package com.aynu.admin.domain.vo;

import cn.hutool.system.JavaRuntimeInfo;
import cn.hutool.system.JvmInfo;
import cn.hutool.system.OsInfo;
import cn.hutool.system.UserInfo;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class StaticSystemInfo {

    private String JVMName;
    private String JVMVersion;
    private String JVMVendor;
    private String JVMInfo;

    private String OSName;
    private String OSArch;
    private String OSVersion;

    private String javaRuntimeName;
    private String javaRuntimeVersion;
    private String javaHomeDir;

    private String userName;
    private String userLanguage;
    private String userCurrentPath;

//    private JvmInfo jvmInfo;
//    private OsInfo osInfo;
//    private UserInfo userInfo;
//    private JavaRuntimeInfo javaRuntimeInfo;

    public StaticSystemInfo(JvmInfo jvmInfo, OsInfo osInfo, JavaRuntimeInfo javaRuntimeInfo,UserInfo userInfo) {
        JVMName = jvmInfo.getName();
        JVMVersion = jvmInfo.getVersion();
        JVMVendor = jvmInfo.getVendor();
        JVMInfo = jvmInfo.getInfo();

        OSName = osInfo.getName();
        OSArch = osInfo.getArch();
        OSVersion = osInfo.getVersion();

        javaRuntimeName = javaRuntimeInfo.getName();
        javaRuntimeVersion = javaRuntimeInfo.getVersion();
        javaHomeDir = javaRuntimeInfo.getHomeDir();

        userName = userInfo.getName();
        userLanguage = userInfo.getLanguage();
        userCurrentPath = userInfo.getCurrentDir();
    }
}
